<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="t" tagdir="/WEB-INF/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<t:layout title="Step 1 - Instasale">
    <div class="row">
        <div class="span6 offset3">
            <form:form commandName="car" action="/cars/basicInformation.html">
                <legend>Add car to catalogue:</legend>
                <form:label path="model">Model</form:label>
                <form:input path="model"/>
                <form:errors path="model" cssClass="help-inline" element="span"/>
                <form:label path="description">Description</form:label>
                <form:textarea path="description" cssClass="span4"/>
                <form:errors path="description" cssClass="help-inline" element="span"/>
                <form:label path="price">Price (USD)</form:label>
                <form:input path="price"/>
                <form:errors path="price" cssClass="help-inline" element="span"/>
                <fieldset>
                    <legend>Choose engine type:</legend>
                    <form:errors path="engineType" cssClass="help-inline" element="span"/>
                    <div class="radio">
                        <form:radiobuttons path="engineType" itemLabel="description"/>
                    </div>
                </fieldset>
                <fieldset>
                    <legend>Choose seller and additional info:</legend>
                    <form:label path="seller">Seller</form:label>
                    <form:select path="seller" disabled="${empty sellersList}">
                        <form:options items="${sellersList}" itemValue="id" itemLabel="title"/>
                    </form:select>
                    <form:errors path="seller" cssClass="help-inline" element="span"/>

                    <form:label path="availableDate">This proposition is available starting:</form:label>
                    <form:input path="availableDate"/>
                    <form:errors path="availableDate" cssClass="help-inline" element="span"/> <br/>
                    <small>year-month-day</small>
                </fieldset>
                <hr/>
                <input type="submit"
                       value="Proceed to the next step" class="btn btn-success"/>
            </form:form>
        </div>
    </div>
</t:layout>